import unittest
from django.conf import settings
from package.HtmlTestRunner.runner import HTMLTestRunner


def run(plan_name):
    loader = unittest.TestLoader()
    suite = loader.discover(start_dir='./', pattern='*_test.py')
    runner = HTMLTestRunner(combine_reports=True, report_name=plan_name, report_title=plan_name, add_timestamp=True)
    runner.run(suite)
    return runner.all_results, runner.summaries, runner.report_path
